<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/pages/common/header.jsp"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Insert title here</title>
		<script type="text/javascript">
		
			function checkPasswordFields(){
				var confirm_pwd=document.getElementById("confirm_pwd").value;
				var new_pwd=document.getElementById("new_pwd").value;
				var repeated_pwd=document.getElementById("repeated_pwd").value;
				if(confirm_pwd==null || confirm_pwd==""){
					alert("Please Enter Your Old Password");
					return false;
				}else if(new_pwd==null || new_pwd==""){
					alert("Please Enter New Password");
					return false;
				}
				else if(repeated_pwd==null || repeated_pwd==""){
					alert("Please Enter Repeated Password");
					return false;
				}else if(new_pwd!=repeated_pwd){
					alert("Your New Password is not matched to repeated password");
					return false;
				}
				return true;
			}
		</script>
	</head>
	<body class="mainbody" onload="msgDisplay('${param.message}');">
		<div class="mainContainer">
			<section class="bodyContainer">
				<div class="">
	            	
					<form id="changePwd" method="post" action="${context}/changePassword">
						<input type="hidden" name="ACTION" value="CPWD">
						<input type="hidden" name="UI" value="${param.userId}">
		    			<div id="changePassword" class="">
							<div class="divclear">
								<div class="signInHeadingTxt">Change Password</div>	
								<div class="hor_space_10"></div>
								<div class="divclear">   
									<div class="forgotPassTxt">Confirm Password</div>
									<div class="forgotPassTxt">
										<input type="password" id="confirm_pwd" name="PWD" placeholder="Confirm Password" value="">
									</div>
								</div>	
								
								<div class="hor_space_10"></div>
								<div class="divclear">   
									<div class="forgotPassTxt">New Password</div>
									<div class="forgotPassTxt">
										<input type="password" id="new_pwd" name="NPWD" placeholder="New Password" value="" >
									</div>
								</div>	
								<div class="divclear">   
									<div class="forgotPassTxt">Re-Enter New Password</div>
									<div class="forgotPassTxt">
										<input type="password"  id="repeated_pwd" name="RPWD" placeholder="Re-Enter New Password" value="" >
									</div>
								</div>	
								<div class="hor_space_10"></div>
								<div class="hor_space_10"></div>
							 	<div class="hor_space_10"></div>
								<div class="divclear">
									<div class="buttonSiyora button80 billHideClass"><a onclick="return checkPasswordFields();" href=""><input
								type="submit" value="Save" /></a></div>
								<span class="buttonSiyora button80 billHideClass"><a href="${context}/pages/jsp/changePassword.jsp?userId=${param.userId}&fName=${param.fName}">Clear</a> </span>
								</div>
							</div>
						</div>
		            </form>
	           	</div>
	  	    </section>
	    </div>             
		<jsp:include page="/pages/common/footer.jsp" />
	</body>
</html>